<script>
tinyMCE.init({
    mode : "exact",
    elements : "content_page",  //add id textarea in here
    theme : "advanced",
  	 plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
    
    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
    theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
   	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
    theme_advanced_resizing : false,             
    height:650,
    width : 900,
    content_css : "css/example.css",

    style_formats : 
	[{title : 'Bold text', inline : 'b'},
	{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
	{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
	{title : 'Example 1', inline : 'span', classes : 'example1'},
	{title : 'Example 2', inline : 'span', classes : 'example2'},
	{title : 'Table styles'},
	{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}]
	
	
});
</script>
<table cellspacing="0" cellpadding="0" width="100%">
	<tbody>
		<tr>
			<td align="left" class='header' height="25px" > 
				<a href="/" class="home" title="Home">&nbsp;Home</a>
				<span class="mark">&nbsp;&raquo;&nbsp;</span> <span class="home" id = "content_title"><?=isset($title)?$title:""?></span> 
			</td>
		</tr>
	</tbody>
</table>
<br/>
<table>
	<tr>
		<td >
			<input type = "hidden" id="hiddId" value="<?=isset($id)?$id:0?>"/>
			<input type = "hidden" id="hiddPageName" value="<?=isset($page_name)?$page_name:""?>"/>
			<div id="resultDiv"><?=isset($message)?$message:null?></div>
		</td>
	</tr>
	<tr>
		<td>
			<textarea id="content_page" name="content_page" cols="40"><?=isset($content_page)?$content_page:null?></textarea>
		</td>
	</tr>
	<tr>
		<td style="text-align:center;">
			<a class="button"  href="javascript:UpdateContentPage()">Update</a>
			<a class="button"  href="<?=base_url()?>contentpage/view/<?=isset($page_name)?$page_name:""?>/<?=isset($page_title)?$page_title:""?>" target="_Blank">Preview</a>
			<br/>
		</td>
	</tr>
</table>